/// <reference path="F:\Html5 Game\Game project\js\libs\kangax-fabric-48.306.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\DBAbstractionLayer.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\GameCanvas.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Node.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\NodeType.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Planet.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Region.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Scale.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\System.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Universe.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Utilities.js"/>
var System = function (name, coordinate, planets) {

    //Verwijzingen
    var obj = this;
    var name = name;
    var coordinate = coordinate;
    var planets = planets;

    //Variabelen

    //Constructor
    var _constructor = function () {
    }


    //Public functies
    obj.draw = function (context, scale) {
        try {
            if (scale == Scale.REGION) {
                context.strokeStyle = "#000000";
                context.fillStyle = "#000000";
                context.beginPath();
                context.arc(coordinate.getX(), coordinate.getY(), 10, 0, Math.PI * 2, true);
                context.closePath();
                context.stroke();
            }
            else if (scale == Scale.SYSTEM) {
                context.fillStyle = '#00f';
                for (planet in planets) {
                    planets[planet].draw(context, scale);
                }
            }
            else {
                planets[0].draw(context, scale); // temporary dont worry :D
            }

        }
        catch (e) {
        }
    }

    //Private Functies

    _constructor();
};